load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("scm_server_infra")

rust_library(
    name = "derived_data_constants",
    srcs = glob(["constants/**/*.rs"]),
    autocargo = {"cargo_toml_dir": "constants"},
)

rust_library(
    name = "derived_data",
    srcs = glob(["src/**/*.rs"]),
    test_deps = [
        "fbsource//third-party/rust:maplit",
        "//common/rust/shed/facet:facet",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/bonsai_hg_mapping:bonsai_hg_mapping",
        "//eden/mononoke/bookmarks:bookmarks",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph:commit_graph",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/repo_factory:test_repo_factory",
        "//eden/mononoke/tests/utils:tests_utils",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:itertools",
        ":derived_data_manager",
        "//common/rust/shed/justknobs_stub:justknobs",
        "//eden/mononoke/blobstore:blobstore",
        "//eden/mononoke/filestore:filestore",
        "//eden/mononoke/metaconfig:metaconfig_types",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/repo_attributes/repo_derived_data:repo_derived_data",
        "//eden/mononoke/repo_attributes/repo_identity:repo_identity",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "bulk_derivation",
    srcs = glob(["bulk_derivation/**/*.rs"]),
    autocargo = {"cargo_toml_dir": "bulk_derivation"},
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:itertools",
        ":basename_suffix_skeleton_manifest_v3",
        ":blame",
        ":case_conflict_skeleton_manifest",
        ":changeset_info",
        ":deleted_manifest",
        ":derived_data_manager",
        ":fastlog",
        ":fsnodes",
        ":inferred_copy_from",
        ":skeleton_manifest",
        ":skeleton_manifest_v2",
        ":test_manifest",
        ":test_sharded_manifest",
        ":unodes",
        "//common/rust/shed/cloned:cloned",
        "//eden/mononoke/derived_data/content_manifest_derivation:content_manifest_derivation",
        "//eden/mononoke/derived_data/filenodes_derivation:filenodes_derivation",
        "//eden/mononoke/derived_data/mercurial_derivation:mercurial_derivation",
        "//eden/mononoke/git/git_types:git_types",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "derived_data_manager",
    srcs = glob(["manager/**/*.rs"]),
    autocargo = {"cargo_toml_dir": "manager"},
    named_deps = {"tracing": "fbsource//third-party/rust:tracing"},
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-recursion",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:either",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:rand",
        "fbsource//third-party/rust:thiserror",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:tracing",
        ":derived_data_constants",
        ":derived_data_remote",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/cloned:cloned",
        "//common/rust/shed/futures_stats:futures_stats",
        "//common/rust/shed/justknobs_stub:justknobs",
        "//common/rust/shed/lock_ext:lock_ext",
        "//common/rust/shed/shared_error:shared_error",
        "//eden/mononoke/blobstore:blobstore",
        "//eden/mononoke/blobstore:cacheblob",
        "//eden/mononoke/blobstore:ephemeral_blobstore",
        "//eden/mononoke/bonsai_git_mapping:bonsai_git_mapping",
        "//eden/mononoke/bonsai_hg_mapping:bonsai_hg_mapping",
        "//eden/mononoke/common/metadata:metadata",
        "//eden/mononoke/common/scuba_ext:scuba_ext",
        "//eden/mononoke/derived_data/remote/if:derived_data_service_if-rust",
        "//eden/mononoke/filenodes:filenodes",
        "//eden/mononoke/filestore:filestore",
        "//eden/mononoke/metaconfig:metaconfig_types",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph:commit_graph",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/repo_attributes/restricted_paths:restricted_paths",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "fsnodes",
    srcs = glob(["fsnodes/*.rs"]),
    autocargo = {"cargo_toml_dir": "fsnodes"},
    named_deps = {"slog": "//common/rust/shed/tracing_slog_compat:tracing_slog_compat"},
    test_deps = [
        "fbsource//third-party/rust:tokio",
        ":derived_data_test_utils",
        "//common/rust/shed/facet:facet",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/bonsai_git_mapping:bonsai_git_mapping",
        "//eden/mononoke/bonsai_hg_mapping:bonsai_hg_mapping",
        "//eden/mononoke/bookmarks:bookmarks",
        "//eden/mononoke/derived_data/mercurial_derivation:mercurial_derivation",
        "//eden/mononoke/filestore:filestore",
        "//eden/mononoke/mercurial:mercurial_types",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph:commit_graph",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/repo_attributes/repo_derived_data:repo_derived_data",
        "//eden/mononoke/repo_attributes/repo_identity:repo_identity",
        "//eden/mononoke/repo_factory:test_repo_factory",
        "//eden/mononoke/tests/fixtures:fixtures",
        "//eden/mononoke/tests/utils:tests_utils",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:ascii",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:digest",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:sha1",
        "fbsource//third-party/rust:sha2",
        "fbsource//third-party/rust:thiserror",
        ":derived_data",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/cloned:cloned",
        "//common/rust/shed/justknobs_stub:justknobs",
        "//common/rust/shed/sorted_vector_map:sorted_vector_map",
        "//common/rust/shed/stats:stats",
        "//eden/mononoke/blobstore:blobstore",
        "//eden/mononoke/derived_data:derived_data_manager",
        "//eden/mononoke/derived_data/remote/if:derived_data_service_if-rust",
        "//eden/mononoke/manifest:manifest",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/repo_attributes/restricted_paths:restricted_paths",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "skeleton_manifest",
    srcs = glob(["skeleton_manifest/*.rs"]),
    autocargo = {"cargo_toml_dir": "skeleton_manifest"},
    test_deps = [
        "fbsource//third-party/rust:pretty_assertions",
        "fbsource//third-party/rust:tokio",
        ":derived_data_test_utils",
        "//common/rust/shed/facet:facet",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/bonsai_hg_mapping:bonsai_hg_mapping",
        "//eden/mononoke/bookmarks:bookmarks",
        "//eden/mononoke/derived_data/mercurial_derivation:mercurial_derivation",
        "//eden/mononoke/filestore:filestore",
        "//eden/mononoke/mercurial:mercurial_types",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph:commit_graph",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/repo_attributes/repo_derived_data:repo_derived_data",
        "//eden/mononoke/repo_attributes/repo_identity:repo_identity",
        "//eden/mononoke/repo_factory:test_repo_factory",
        "//eden/mononoke/tests/fixtures:fixtures",
        "//eden/mononoke/tests/utils:tests_utils",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:thiserror",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/cloned:cloned",
        "//common/rust/shed/sorted_vector_map:sorted_vector_map",
        "//common/rust/shed/stats:stats",
        "//eden/mononoke/blobstore:blobstore",
        "//eden/mononoke/derived_data:derived_data",
        "//eden/mononoke/derived_data:derived_data_manager",
        "//eden/mononoke/derived_data/remote/if:derived_data_service_if-rust",
        "//eden/mononoke/manifest:manifest",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "unodes",
    srcs = glob(["unodes/*.rs"]),
    autocargo = {"cargo_toml_dir": "unodes"},
    test_deps = [
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:maplit",
        ":derived_data_test_utils",
        "//common/rust/shed/facet:facet",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/bonsai_hg_mapping:bonsai_hg_mapping",
        "//eden/mononoke/bookmarks:bookmarks",
        "//eden/mononoke/changesets/changesets_creation:changesets_creation",
        "//eden/mononoke/derived_data/filenodes_derivation:filenodes_derivation",
        "//eden/mononoke/derived_data/mercurial_derivation:mercurial_derivation",
        "//eden/mononoke/filenodes:filenodes",
        "//eden/mononoke/filestore:filestore",
        "//eden/mononoke/mercurial:mercurial_types",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph:commit_graph",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/repo_attributes/repo_derived_data:repo_derived_data",
        "//eden/mononoke/repo_attributes/repo_identity:repo_identity",
        "//eden/mononoke/repo_factory:test_repo_factory",
        "//eden/mononoke/tests/fixtures:fixtures",
        "//eden/mononoke/tests/utils:tests_utils",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:thiserror",
        "fbsource//third-party/rust:tracing",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/cloned:cloned",
        "//common/rust/shed/sorted_vector_map:sorted_vector_map",
        "//common/rust/shed/stats:stats",
        "//eden/mononoke/blobstore:blobstore",
        "//eden/mononoke/derived_data:derived_data",
        "//eden/mononoke/derived_data:derived_data_manager",
        "//eden/mononoke/derived_data/remote/if:derived_data_service_if-rust",
        "//eden/mononoke/manifest:manifest",
        "//eden/mononoke/metaconfig:metaconfig_types",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "fastlog",
    srcs = glob(["fastlog/*.rs"]),
    autocargo = {"cargo_toml_dir": "fastlog"},
    test_deps = [
        "fbsource//third-party/rust:pretty_assertions",
        "fbsource//third-party/rust:rand",
        "fbsource//third-party/rust:rand_xorshift",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/facet:facet",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/bonsai_hg_mapping:bonsai_hg_mapping",
        "//eden/mononoke/bookmarks:bookmarks",
        "//eden/mononoke/changesets/changesets_creation:changesets_creation",
        "//eden/mononoke/derived_data/mercurial_derivation:mercurial_derivation",
        "//eden/mononoke/filestore:filestore",
        "//eden/mononoke/mercurial:mercurial_types",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/mononoke_types:mononoke_types-mocks",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph:commit_graph",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/repo_attributes/repo_derived_data:repo_derived_data",
        "//eden/mononoke/repo_attributes/repo_identity:repo_identity",
        "//eden/mononoke/tests/fixtures:fixtures",
        "//eden/mononoke/tests/utils:tests_utils",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:maplit",
        "fbsource//third-party/rust:thiserror",
        ":derived_data_manager",
        ":unodes",
        "//common/rust/shed/cloned:cloned",
        "//eden/mononoke/blobstore:blobstore",
        "//eden/mononoke/derived_data/remote/if:derived_data_service_if-rust",
        "//eden/mononoke/manifest:manifest",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "blame",
    srcs = glob(["blame/*.rs"]),
    autocargo = {"cargo_toml_dir": "blame"},
    named_deps = {"tracing": "fbsource//third-party/rust:tracing"},
    test_deps = [
        "fbsource//third-party/rust:maplit",
        "//common/rust/shed/facet:facet",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/bonsai_hg_mapping:bonsai_hg_mapping",
        "//eden/mononoke/bookmarks:bookmarks",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph:commit_graph",
        "//eden/mononoke/repo_attributes/repo_identity:repo_identity",
        "//eden/mononoke/repo_factory:test_repo_factory",
        "//eden/mononoke/tests/utils:tests_utils",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:thiserror",
        ":derived_data",
        ":derived_data_manager",
        ":unodes",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/cloned:cloned",
        "//common/rust/shed/lock_ext:lock_ext",
        "//eden/mononoke/blobstore:blobstore",
        "//eden/mononoke/derived_data/remote/if:derived_data_service_if-rust",
        "//eden/mononoke/filestore:filestore",
        "//eden/mononoke/manifest:manifest",
        "//eden/mononoke/metaconfig:metaconfig_types",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/repo_attributes/repo_derived_data:repo_derived_data",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "changeset_info",
    srcs = glob(["changeset_info/*.rs"]),
    autocargo = {"cargo_toml_dir": "changeset_info"},
    crate_root = "changeset_info/lib.rs",
    test_deps = [
        "//common/rust/shed/facet:facet",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/bonsai_hg_mapping:bonsai_hg_mapping",
        "//eden/mononoke/bookmarks:bookmarks",
        "//eden/mononoke/filestore:filestore",
        "//eden/mononoke/mercurial:mercurial_types",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph:commit_graph",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/repo_attributes/repo_derived_data:repo_derived_data",
        "//eden/mononoke/repo_attributes/repo_identity:repo_identity",
        "//eden/mononoke/tests/fixtures:fixtures",
        "//eden/mononoke/tests/utils:tests_utils",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:smallvec",
        "fbsource//third-party/rust:unicode-segmentation",
        ":derived_data_manager",
        "//common/rust/shed/sorted_vector_map:sorted_vector_map",
        "//eden/mononoke/blobstore:blobstore",
        "//eden/mononoke/derived_data/remote/if:derived_data_service_if-rust",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/mononoke_types/serialization:mononoke_types_serialization-rust",
        "//eden/mononoke/server/context:context",
        "//thrift/lib/rust:fbthrift",
    ],
)

rust_library(
    name = "deleted_manifest",
    srcs = glob(["deleted_manifest/*.rs"]),
    autocargo = {"cargo_toml_dir": "deleted_manifest"},
    named_deps = {"tracing": "fbsource//third-party/rust:tracing"},
    test_deps = [
        "fbcode//common/rust/shed/sorted_vector_map:sorted_vector_map",
        "fbsource//third-party/rust:maplit",
        "fbsource//third-party/rust:pretty_assertions",
        ":derived_data_test_utils",
        "//common/rust/shed/facet:facet",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/bonsai_hg_mapping:bonsai_hg_mapping",
        "//eden/mononoke/bookmarks:bookmarks",
        "//eden/mononoke/changesets/changesets_creation:changesets_creation",
        "//eden/mononoke/filestore:filestore",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/repo_attributes/repo_identity:repo_identity",
        "//eden/mononoke/repo_factory:test_repo_factory",
        "//eden/mononoke/tests/fixtures:fixtures",
        "//eden/mononoke/tests/utils:tests_utils",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-stream",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:atomic-counter",
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:itertools",
        "fbsource//third-party/rust:maplit",
        "fbsource//third-party/rust:multimap",
        "fbsource//third-party/rust:tokio",
        ":derived_data",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/bounded_traversal:bounded_traversal",
        "//common/rust/shed/cloned:cloned",
        "//eden/mononoke/blobstore:blobstore",
        "//eden/mononoke/derived_data:derived_data_manager",
        "//eden/mononoke/derived_data:unodes",
        "//eden/mononoke/derived_data/remote/if:derived_data_service_if-rust",
        "//eden/mononoke/manifest:manifest",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph:commit_graph",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/repo_attributes/repo_derived_data:repo_derived_data",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "basename_suffix_skeleton_manifest_v3",
    srcs = glob(["basename_suffix_skeleton_manifest_v3/*.rs"]),
    autocargo = {"cargo_toml_dir": "basename_suffix_skeleton_manifest_v3"},
    test_deps = [
        "fbsource//third-party/rust:async-recursion",
        "fbsource//third-party/rust:quickcheck",
        "//common/rust/shed/facet:facet",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/bonsai_hg_mapping:bonsai_hg_mapping",
        "//eden/mononoke/bookmarks:bookmarks",
        "//eden/mononoke/filestore:filestore",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph:commit_graph",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/repo_attributes/repo_derived_data:repo_derived_data",
        "//eden/mononoke/repo_attributes/repo_identity:repo_identity",
        "//eden/mononoke/tests/fixtures:fixtures",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-stream",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:itertools",
        "fbsource//third-party/rust:vec1",
        ":skeleton_manifest",
        "//common/rust/shed/cloned:cloned",
        "//eden/mononoke/blobstore:blobstore",
        "//eden/mononoke/derived_data:derived_data_manager",
        "//eden/mononoke/derived_data/remote/if:derived_data_service_if-rust",
        "//eden/mononoke/manifest:manifest",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "skeleton_manifest_v2",
    srcs = glob(["skeleton_manifest_v2/*.rs"]),
    autocargo = {"cargo_toml_dir": "skeleton_manifest_v2"},
    test_deps = [
        "fbsource//third-party/rust:async-recursion",
        "fbsource//third-party/rust:pretty_assertions",
        "//common/rust/shed/facet:facet",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/bonsai_hg_mapping:bonsai_hg_mapping",
        "//eden/mononoke/bookmarks:bookmarks",
        "//eden/mononoke/filestore:filestore",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph:commit_graph",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/repo_attributes/repo_derived_data:repo_derived_data",
        "//eden/mononoke/repo_attributes/repo_identity:repo_identity",
        "//eden/mononoke/repo_factory:test_repo_factory",
        "//eden/mononoke/tests/fixtures:fixtures",
        "//eden/mononoke/tests/utils:tests_utils",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:itertools",
        "//common/rust/shed/cloned:cloned",
        "//common/rust/shed/justknobs_stub:justknobs",
        "//eden/mononoke/blobstore:blobstore",
        "//eden/mononoke/derived_data:derived_data_manager",
        "//eden/mononoke/derived_data:skeleton_manifest",
        "//eden/mononoke/derived_data/remote/if:derived_data_service_if-rust",
        "//eden/mononoke/manifest:manifest",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "case_conflict_skeleton_manifest",
    srcs = glob(["case_conflict_skeleton_manifest/*.rs"]),
    autocargo = {"cargo_toml_dir": "case_conflict_skeleton_manifest"},
    test_deps = [
        "fbsource//third-party/rust:async-recursion",
        "fbsource//third-party/rust:itertools",
        "fbsource//third-party/rust:pretty_assertions",
        "fbsource//third-party/rust:quickcheck",
        ":skeleton_manifest_v2",
        "//common/rust/shed/facet:facet",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/bonsai_hg_mapping:bonsai_hg_mapping",
        "//eden/mononoke/bookmarks:bookmarks",
        "//eden/mononoke/filestore:filestore",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph:commit_graph",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/repo_attributes/repo_derived_data:repo_derived_data",
        "//eden/mononoke/repo_attributes/repo_identity:repo_identity",
        "//eden/mononoke/repo_factory:test_repo_factory",
        "//eden/mononoke/tests/fixtures:fixtures",
        "//eden/mononoke/tests/utils:tests_utils",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:itertools",
        "//common/rust/shed/cloned:cloned",
        "//common/rust/shed/justknobs_stub:justknobs",
        "//eden/mononoke/blobstore:blobstore",
        "//eden/mononoke/derived_data:derived_data_manager",
        "//eden/mononoke/derived_data:skeleton_manifest",
        "//eden/mononoke/derived_data/remote/if:derived_data_service_if-rust",
        "//eden/mononoke/manifest:manifest",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "inferred_copy_from",
    srcs = glob(["inferred_copy_from/*.rs"]),
    autocargo = {"cargo_toml_dir": "inferred_copy_from"},
    test_deps = [
        "fbsource//third-party/rust:assert_approx_eq",
        "//common/rust/shed/facet:facet",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/mononoke_api:mononoke_api",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/repo_attributes/repo_derived_data:repo_derived_data",
        "//eden/mononoke/repo_factory:test_repo_factory",
        "//eden/mononoke/tests/utils:tests_utils",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:itertools",
        "fbsource//third-party/rust:similar",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:vec1",
        ":basename_suffix_skeleton_manifest_v3",
        ":fsnodes",
        "//common/rust/shed/cloned:cloned",
        "//eden/mononoke/blobstore:blobstore",
        "//eden/mononoke/derived_data:derived_data_manager",
        "//eden/mononoke/derived_data/remote/if:derived_data_service_if-rust",
        "//eden/mononoke/filestore:filestore",
        "//eden/mononoke/manifest:manifest",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "test_manifest",
    srcs = glob(["test_manifest/*.rs"]),
    autocargo = {"cargo_toml_dir": "test_manifest"},
    test_deps = [
        "fbsource//third-party/rust:async-recursion",
        "fbsource//third-party/rust:futures",
        "//common/rust/shed/facet:facet",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/bonsai_hg_mapping:bonsai_hg_mapping",
        "//eden/mononoke/bookmarks:bookmarks",
        "//eden/mononoke/filestore:filestore",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph:commit_graph",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/repo_attributes/repo_derived_data:repo_derived_data",
        "//eden/mononoke/repo_attributes/repo_identity:repo_identity",
        "//eden/mononoke/tests/fixtures:fixtures",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:futures",
        ":skeleton_manifest",
        "//common/rust/shed/cloned:cloned",
        "//eden/mononoke/blobstore:blobstore",
        "//eden/mononoke/derived_data:derived_data_manager",
        "//eden/mononoke/derived_data/remote/if:derived_data_service_if-rust",
        "//eden/mononoke/manifest:manifest",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "test_sharded_manifest",
    srcs = glob(["test_sharded_manifest/*.rs"]),
    autocargo = {"cargo_toml_dir": "test_sharded_manifest"},
    test_deps = [
        "fbsource//third-party/rust:async-recursion",
        "fbsource//third-party/rust:futures",
        "//common/rust/shed/facet:facet",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/bonsai_hg_mapping:bonsai_hg_mapping",
        "//eden/mononoke/bookmarks:bookmarks",
        "//eden/mononoke/filestore:filestore",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph:commit_graph",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/repo_attributes/repo_derived_data:repo_derived_data",
        "//eden/mononoke/repo_attributes/repo_identity:repo_identity",
        "//eden/mononoke/tests/fixtures:fixtures",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:itertools",
        ":skeleton_manifest",
        ":test_manifest",
        "//common/rust/shed/cloned:cloned",
        "//common/rust/shed/sorted_vector_map:sorted_vector_map",
        "//eden/mononoke/blobstore:blobstore",
        "//eden/mononoke/derived_data:derived_data_manager",
        "//eden/mononoke/derived_data:test_manifest",
        "//eden/mononoke/derived_data/remote/if:derived_data_service_if-rust",
        "//eden/mononoke/manifest:manifest",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "derived_data_test_utils",
    srcs = glob(["test_utils/*.rs"]),
    autocargo = {"cargo_toml_dir": "test_utils"},
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:futures",
        "//common/rust/shed/bounded_traversal:bounded_traversal",
        "//eden/mononoke/blobstore:blobstore",
        "//eden/mononoke/bonsai_hg_mapping:bonsai_hg_mapping",
        "//eden/mononoke/manifest:manifest",
        "//eden/mononoke/mercurial:mercurial_types",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/server/context:context",
    ],
)

rust_library(
    name = "derived_data_remote",
    srcs = glob(["remote/*.rs"]),
    autocargo = {"cargo_toml_dir": "remote"},
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:clap",
        "//eden/mononoke/cmdlib:arg_extensions",
        "//eden/mononoke/derived_data/remote/if:derived_data_service_if-rust",
        "//eden/mononoke/server/context:context",
    ],
)
